import request from '@/router/axios';

//询价列表
export const getList = (current, size, params) => {
    return request({
        url: '/api/blade-tms/enquiry/inquirySheet/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
//询价详情
export const getDetails = (id) => {
    return request({
        url: '/api/blade-tms/enquiry/inquirySheet/detail',
        method: 'get',
        params: {
            id
        }
    })
}
//询价单行项目详情
export const getItemDetails = (id) => {
    return request({
        url: '/api/blade-tms/enquiry/inquirySheet/enquiryItemDetail',
        method: 'get',
        params: {
            id
        }
    })
}
//报价排行列表
export const getRanking = (data) => {
    return request({
        url: '/api/blade-tms/enquiry/inquirySheet/ranking',
        method: 'post',
        data: {
            ...data,
        }
    })
}
//报价
export const quotedPrice = (data) => {
    return request({
        url: '/api/blade-tms/enquiry/inquirySheet/quotedPrice',
        method: 'post',
        data: {
            ...data,
        }
    })
}
//确认报价接口
export const confirmOffer = (id) => {
    return request({
        url: '/api/blade-tms/enquiry/inquirySheet/confirmOffer?id=' + id,
        method: 'post',
    })
}
//提交报价接口
export const submit = (id) => {
    return request({
        url: '/api/blade-tms/enquiry/inquirySheet/submit?id=' + id,
        method: 'post',
    })
}
//询价单结束
export const close = (id) => {
    return request({
        url: '/api/blade-tms/enquiry/inquirySheet/end?id=' + id,
        method: 'post',
    })
}
//修改询价响应日期和截止日期
export const updateDate = (data) => {
    return request({
        url: '/api/blade-tms/Inquiry/InquirySheet/updateDate',
        method: 'post',
        data: {
            ...data,
        }
    })
}
//手动提交OA接口
export const submitOA = (id) => {
    return request({
        url: '/api/blade-tms/Inquiry/InquirySheet/submitOA',
        method: 'get',
        params: {
            id
        }
    })
}